LaunchApp(Fat) is a fat (68k and PPC code) plugin for realBASIC 1
Why?
realBASIC already has a Launch method for FolderItems. The problem is, realBASIC has it’s own idea about what and app is. If it doesn’t think the FolderItem you try to launch is an app, then it won’t launch it. The realBASIC launch method can launch applications and documents, so it has to draw the line somewhere, I suppose.
Additionally, using LaunchApplication allows you to control whether the launched application comes to the foreground or remains in the background.
I specifically wrote the plugin so that I could launch the Mac OS 8.5 Application Switcher which is an app whose file type is ‘appe’. Other apps of this type include the Control Strip and Print Spoolers. I found 26 ‘appe’ apps on my system.
Another possible use is for launching satellite programs which you don’t want the user to be able to launch manually. You might set the satellite application’s creator and type so that the main application is launched if someone double clicks it, yet you would still be able to launch the satellite application programmatically.
LaunchApplication Plugin Function
LaunchApplication( theApp as FolderItem, activateFlag as Boolean ) as Boolean
Launches a FolderItem. Returns true if successful or false if the launch fails. If the parameter activateFlag equals true then the application will come to the front, if activateFlag equals false the application will launch in the background.
example:
Dim theFile as FolderItem
theFile = GetOpenFolderItem( "any" ) //file type ????/????
//here's the LaunchApplication plugin function
if not LaunchApplication( theFile, true ) then
//tell the user we failed
MsgBox "The file didn't launch."
end if
The launchApplication plugin may be freely distributed and used in any way you see fit so long as this document remains unaltered and is distributed with the plugin.